package model;

import view.*;
import java.util.ArrayList;
import java.util.List;

/**
 * Abstract class AbstractModel
 * This class functions as a super for Simulator
 * @author Team X
 * @version 1
 */
public abstract class AbstractModel 
{
	private List<AbstractView> views;
	
	/**
	 * Constructor
	 */
	public AbstractModel() 
	{
		views = new ArrayList<AbstractView>();
	}
	
	/**
	 * This method adds views.
	 * @param view
	 */
	public void addView(AbstractView view) 
	{
		views.add(view);
	}
	
	/**
	 * Update views
	 */
	public void notifyViews() 
	{
		for(AbstractView v: views) v.updateView();
	}
}